<div class="product-details"><!--product-details-->
    <div class="col-sm-5">
        <div class="view-product" id="primary-img">
            <?php
            $photo  = theme_img('no_picture.png', lang('no_image_available'));
            $product->images    = array_values($product->images);

            if(!empty($product->images[0]))
            {
                $primary    = $product->images[0];
                foreach($product->images as $photo)
                {
                    if(isset($photo->primary))
                    {
                        $primary    = $photo;
                    }
                }

                $photo  = '<img id="primary_detail_img" src="'.base_url('uploads/images/medium/'.$primary->filename).'" data-zoom-image="'.base_url('uploads/images/full/'.$primary->filename).'" alt="'.$product->seo_title.'"/>';
            }
            echo $photo
            ?>
        </div>
        <script type="text/javascript">
            $("#primary_detail_img").elevateZoom({easing : true, zoomWindowFadeIn: 200, zoomWindowFadeOut: 500, lensFadeIn: 500, lensFadeOut: 500, scrollZoom : true, zoomWindowOffetx: 20});
        </script>
        <?php if(count($product->images) > 1):?>
            <div id="similar-product" class="carousel slide" data-ride="carousel">
                <!-- Wrapper for slides -->
                <div class="carousel-inner">
                    <?php $idx = 0?>
                    <?php foreach($product->images as $image):?>
                            <?php if($idx == 0):?>
                                <div class="item active">
                            <?php elseif($idx % 3 == 0):?>
                                <div class="item">
                            <?php endif; ?>
                                <img class="span1 detail" onclick="$(this).squard('390', $('#primary-img'));" src="<?php echo base_url('uploads/images/full/'.$image->filename);?>"/>
                                <?php $idx++;?>
                            <?php if($idx % 3 == 0):?>
                                </div>
                            <?php endif;?>
                    <?php endforeach;?>
                    <?php if($idx % 3 != 0):?>
                        </div>
                    <?php endif;?>
                </div>

                <!-- Controls -->
                <a class="left item-control" href="#similar-product" data-slide="prev">
                    <i class="fa fa-angle-left"></i>
                </a>
                <a class="right item-control" href="#similar-product" data-slide="next">
                    <i class="fa fa-angle-right"></i>
                </a>
            </div>
        <?php endif;?>
    </div>
    <div class="col-sm-7">
        <div class="product-information"><!--/product-information-->
<!--            <img src="images/product-details/new.jpg" class="newarrival" alt="" />-->
            <?php if($this->session->userdata('admin')): ?>
                <p style="margin-bottom: 10px"><a class="btn btn-primary" title="<?php echo lang('edit_product'); ?>" href="<?php echo  site_url($this->config->item('admin_folder').'/products/form/'.$product->id); ?>"><i class="fa fa-pencil-square-o"></i> Sửa sản phẩm</a></p>
            <?php endif; ?>
            <h1>Hàng order : <?php echo $product->name;?></h1>
<!--            <p>Web ID: 1089772</p>-->
            <p><img src="<?php echo base_url('assets/img/rating.png') ?>" alt=""></p>
            <span>
                <?php if($product->saleprice > 0):?>

                    <div><span class="product_price_before_sale"><?php echo format_currency($product->price); ?></span></div>
                    <p>
    <!--                        <span class="product_price_sale_label">--><?php //echo lang('on_sale');?><!--</span>-->
                        <span class="product_price_sale"><?php echo format_currency($product->saleprice); ?></span>
                    </p>
                    <img src="<?php echo base_url('assets/img/sale.png') ?>" class="new" alt="">
                <?php else: ?>
    <!--                    <small>--><?php //echo lang('product_price');?><!--</small>-->
                    <p>
                        <span class="product_price"><?php echo format_currency($product->price); ?></span>
                    </p>
                    <img src="<?php echo base_url('assets/img/new.png') ?>" class="new" alt="">
                <?php endif;?>
            </span>
                <?php echo form_open('cart/add_to_cart', 'class="form-horizontal"');?>
                <input type="hidden" name="cartkey" value="<?php echo $this->session->flashdata('cartkey');?>" />
                    <input type="hidden" name="id" value="<?php echo $product->id?>"/>
                    <fieldset>
                        <?php if(count($options) > 0): ?>
                            <?php foreach($options as $option):
                                $required   = '';
                                if($option->required)
                                {
                                    $required = ' <p class="help-block">Required</p>';
                                }
                                ?>
                                <div class="control-group">
                                    <label class="control-label"><?php echo $option->name;?></label>
                                    <?php
                                    /*
                                    this is where we generate the options and either use default values, or previously posted variables
                                    that we either returned for errors, or in some other releases of Go Cart the user may be editing
                                    and entry in their cart.
                                    */

                                    //if we're dealing with a textfield or text area, grab the option value and store it in value
                                    if($option->type == 'checklist')
                                    {
                                        $value  = array();
                                        if($posted_options && isset($posted_options[$option->id]))
                                        {
                                            $value  = $posted_options[$option->id];
                                        }
                                    }
                                    else
                                    {
                                        if(isset($option->values[0]))
                                        {
                                            $value  = $option->values[0]->value;
                                            if($posted_options && isset($posted_options[$option->id]))
                                            {
                                                $value  = $posted_options[$option->id];
                                            }
                                        }
                                        else
                                        {
                                            $value = false;
                                        }
                                    }

                                    if($option->type == 'textfield'):?>
                                        <div class="controls">
                                            <input type="text" name="option[<?php echo $option->id;?>]" value="<?php echo $value;?>" class="span4"/>
                                            <?php echo $required;?>
                                        </div>
                                    <?php elseif($option->type == 'textarea'):?>
                                        <div class="controls">
                                            <textarea class="span4" name="option[<?php echo $option->id;?>]"><?php echo $value;?></textarea>
                                            <?php echo $required;?>
                                        </div>
                                    <?php elseif($option->type == 'droplist'):?>
                                        <div class="controls">
                                            <select name="option[<?php echo $option->id;?>]">
                                                <option value=""><?php echo lang('choose_option');?></option>

                                                <?php foreach ($option->values as $values):
                                                    $selected   = '';
                                                    if($value == $values->id)
                                                    {
                                                        $selected   = ' selected="selected"';
                                                    }?>

                                                    <option<?php echo $selected;?> value="<?php echo $values->id;?>">
                                                        <?php echo($values->price != 0)?' (+'.format_currency($values->price).') ':''; echo $values->name;?>
                                                    </option>

                                                <?php endforeach;?>
                                            </select>
                                            <?php echo $required;?>
                                        </div>
                                    <?php elseif($option->type == 'radiolist'):?>
                                        <div class="controls">
                                            <?php foreach ($option->values as $values):

                                                $checked = '';
                                                if($value == $values->id)
                                                {
                                                    $checked = ' checked="checked"';
                                                }?>
                                                <label class="radio">
                                                    <input<?php echo $checked;?> type="radio" name="option[<?php echo $option->id;?>]" value="<?php echo $values->id;?>"/>
                                                    <?php echo($values->price != 0)?'(+'.format_currency($values->price).') ':''; echo $values->name;?>
                                                </label>
                                            <?php endforeach;?>
                                            <?php echo $required;?>
                                        </div>
                                    <?php elseif($option->type == 'checklist'):?>
                                        <div class="controls">
                                            <?php foreach ($option->values as $values):

                                                $checked = '';
                                                if(in_array($values->id, $value))
                                                {
                                                    $checked = ' checked="checked"';
                                                }?>
                                                <label class="checkbox">
                                                    <input<?php echo $checked;?> type="checkbox" name="option[<?php echo $option->id;?>][]" value="<?php echo $values->id;?>"/>
                                                    <?php echo($values->price != 0)?'('.format_currency($values->price).') ':''; echo $values->name;?>
                                                </label>

                                            <?php endforeach; ?>
                                        </div>
                                        <?php echo $required;?>
                                    <?php endif;?>
                                </div>
                            <?php endforeach;?>
                        <?php endif;?>
               <!-- <label class="quantity"><?php /*echo lang('quantity') */?> </label>
                    <?php /*if(!config_item('inventory_enabled') || config_item('allow_os_purchase') || !(bool)$product->track_stock || $product->quantity > 0) : */?>
                        <?php /*if(!$product->fixed_quantity) : */?>
                            <input class="quantity" type="text" name="quantity" value=""/>
                        <?php /*endif; */?>
                        <button  type="submit"  value="submit" class="btn btn-fefault cart">
                            <i class="fa fa-shopping-cart"></i>
                            <?php /*echo lang('form_add_to_cart');*/?>
                        </button>
                    --><?php /*endif;*/?>
                    </fieldset>
                </form>
            </span>
<!--            <p><b>Availability:</b> In Stock</p>-->
<!--            <p><b>Condition:</b> New</p>-->
<!--            <p><b>Brand:</b> E-SHOPPER</p>-->
<!--            <a href=""><img src="images/product-details/share.png" class="share img-responsive"  alt="" /></a>-->
        </div><!--/product-information-->
    </div>

</div><!--/product-details-->
<div class="col-sm-12">
    <div class="row">
            <?php echo $product->excerpt;?>
        </div>
    </div>
</div">
<!--<div class="col-sm-12">
    <div class="row" style="margin-top:15px; margin-bottom:15px;">
        <div class="span4 sku-pricing">
            <?php /*if(!empty($product->sku)):*/?><div><?php /*echo lang('sku');*/?>: <?php /*echo $product->sku; */?></div><?php /*endif;*/?>&nbsp;
        </div>
        <?php /*if((bool)$product->track_stock && $product->quantity < 1 && config_item('inventory_enabled')):*/?>
            <div class="span4 out-of-stock">
                <div class="stock_msg"><?php /*echo lang('out_of_stock');*/?></div>
            </div>
        <?php /*endif;*/?>
    </div>
</div>-->
<div class="category-tab shop-details-tab"><!--category-tab-->
    <div class="col-sm-12">
        <ul class="nav nav-tabs head in">
            <li><a class="head">Details</a></li>
<!--            <li><a href="#companyprofile" data-toggle="tab">Company Profile</a></li>-->
<!--            <li><a href="#tag" data-toggle="tab">Tag</a></li>-->
<!--            <li class="active"><a href="#reviews" data-toggle="tab">Reviews (5)</a></li>-->
        </ul>
    </div>
    <div class="tab-content">
        <div class="tab-pane fade active in" id="details">
            <div class="dv_detail_content" style="text-align: center">
                <?php /*echo $product->description; */?>
                <p><span class="important_note">Liên lạc trực tiếp để có giá tốt hơn</span></p>

                <p><span class="step_buy_item">Địa chỉ:472 Thụy Khuê, Tây Hồ , Hà Nội .</span></p>

                <p><span class="step_buy_item">Điện thoại: Mr.Tùng 0946 606 603    </span></p>

                <p><span class="step_buy_item">Yahoo: sieuthivn1         </span></p>

                <p><span class="step_buy_item">Email: sieuthivn.net@gmail.com   </span></p>

                <p><h1><span class="important_note">Sieuthivn nhận order, taobao, paipai, nhận order quảng châu, nhận order tại hà nội</span></h1></p>
            </div>
        </div>

<!--        <div class="tab-pane fade" id="companyprofile" >-->
<!--            <div class="col-sm-3">-->
<!--                <div class="product-image-wrapper">-->
<!--                    <div class="single-products">-->
<!--                        <div class="productinfo text-center">-->
<!--                            <img src="images/home/gallery1.jpg" alt="" />-->
<!--                            <h2>$56</h2>-->
<!--                            <p>Easy Polo Black Edition</p>-->
<!--                            <button type="button" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</button>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="col-sm-3">-->
<!--                <div class="product-image-wrapper">-->
<!--                    <div class="single-products">-->
<!--                        <div class="productinfo text-center">-->
<!--                            <img src="images/home/gallery3.jpg" alt="" />-->
<!--                            <h2>$56</h2>-->
<!--                            <p>Easy Polo Black Edition</p>-->
<!--                            <button type="button" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</button>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="col-sm-3">-->
<!--                <div class="product-image-wrapper">-->
<!--                    <div class="single-products">-->
<!--                        <div class="productinfo text-center">-->
<!--                            <img src="images/home/gallery2.jpg" alt="" />-->
<!--                            <h2>$56</h2>-->
<!--                            <p>Easy Polo Black Edition</p>-->
<!--                            <button type="button" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</button>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="col-sm-3">-->
<!--                <div class="product-image-wrapper">-->
<!--                    <div class="single-products">-->
<!--                        <div class="productinfo text-center">-->
<!--                            <img src="images/home/gallery4.jpg" alt="" />-->
<!--                            <h2>$56</h2>-->
<!--                            <p>Easy Polo Black Edition</p>-->
<!--                            <button type="button" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</button>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!---->
<!--        <div class="tab-pane fade" id="tag" >-->
<!--            <div class="col-sm-3">-->
<!--                <div class="product-image-wrapper">-->
<!--                    <div class="single-products">-->
<!--                        <div class="productinfo text-center">-->
<!--                            <img src="images/home/gallery1.jpg" alt="" />-->
<!--                            <h2>$56</h2>-->
<!--                            <p>Easy Polo Black Edition</p>-->
<!--                            <button type="button" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</button>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="col-sm-3">-->
<!--                <div class="product-image-wrapper">-->
<!--                    <div class="single-products">-->
<!--                        <div class="productinfo text-center">-->
<!--                            <img src="images/home/gallery2.jpg" alt="" />-->
<!--                            <h2>$56</h2>-->
<!--                            <p>Easy Polo Black Edition</p>-->
<!--                            <button type="button" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</button>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="col-sm-3">-->
<!--                <div class="product-image-wrapper">-->
<!--                    <div class="single-products">-->
<!--                        <div class="productinfo text-center">-->
<!--                            <img src="images/home/gallery3.jpg" alt="" />-->
<!--                            <h2>$56</h2>-->
<!--                            <p>Easy Polo Black Edition</p>-->
<!--                            <button type="button" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</button>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="col-sm-3">-->
<!--                <div class="product-image-wrapper">-->
<!--                    <div class="single-products">-->
<!--                        <div class="productinfo text-center">-->
<!--                            <img src="images/home/gallery4.jpg" alt="" />-->
<!--                            <h2>$56</h2>-->
<!--                            <p>Easy Polo Black Edition</p>-->
<!--                            <button type="button" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</button>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!---->
<!--        <div class="tab-pane fade active in" id="reviews" >-->
<!--            <div class="col-sm-12">-->
<!--                <ul>-->
<!--                    <li><a href=""><i class="fa fa-user"></i>EUGEN</a></li>-->
<!--                    <li><a href=""><i class="fa fa-clock-o"></i>12:41 PM</a></li>-->
<!--                    <li><a href=""><i class="fa fa-calendar-o"></i>31 DEC 2014</a></li>-->
<!--                </ul>-->
<!--                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>-->
<!--                <p><b>Write Your Review</b></p>-->
<!---->
<!--                <form action="#">-->
<!--										<span>-->
<!--											<input type="text" placeholder="Your Name"/>-->
<!--											<input type="email" placeholder="Email Address"/>-->
<!--										</span>-->
<!--                    <textarea name="" ></textarea>-->
<!--                    <b>Rating: </b> <img src="images/product-details/rating.png" alt="" />-->
<!--                    <button type="button" class="btn btn-default pull-right">-->
<!--                        Submit-->
<!--                    </button>-->
<!--                </form>-->
<!--            </div>-->
<!--        </div>-->

    </div>
</div><!--/category-tab-->

<?php /*if(!empty($product->related_products)):*/?><!--
    <div class="related_products">
        <div class="row">
            <div class="span4">
                <h3 style="margin-top:20px;"><?php /*echo lang('related_products_title');*/?></h3>
                <ul class="thumbnails">
                    <?php /*foreach($product->related_products as $relate):*/?>
                        <li class="span2 product">
                            <?php
/*                            $photo  = theme_img('no_picture.png', lang('no_image_available'));



                            $relate->images = array_values((array)json_decode($relate->images));

                            if(!empty($relate->images[0]))
                            {
                                $primary    = $relate->images[0];
                                foreach($relate->images as $photo)
                                {
                                    if(isset($photo->primary))
                                    {
                                        $primary    = $photo;
                                    }
                                }

                                $photo  = '<img src="'.base_url('uploads/images/thumbnails/'.$primary->filename).'" alt="'.$relate->seo_title.'"/>';
                            }
                            */?>
                            <a class="thumbnail" href="<?php /*echo site_url($relate->slug); */?>">
                                <?php /*echo $photo; */?>
                            </a>
                            <h5 style="margin-top:5px;"><a href="<?php /*echo site_url($relate->slug); */?>"><?php /*echo $relate->name;*/?></a>
                                <?php /*if($this->session->userdata('admin')): */?>
                                    <a class="btn" title="<?php /*echo lang('edit_product'); */?>" href="<?php /*echo  site_url($this->config->item('admin_folder').'/products/form/'.$relate->id); */?>"><i class="icon-pencil"></i></a>
                                <?php /*endif; */?>
                            </h5>

                            <div>
                                <?php /*if($relate->saleprice > 0):*/?>
                                    <span class="price-slash"><?php /*echo lang('product_reg');*/?> <?php /*echo format_currency($relate->price); */?></span>
                                    <span class="price-sale"><?php /*echo lang('product_sale');*/?> <?php /*echo format_currency($relate->saleprice); */?></span>
                                <?php /*else: */?>
                                    <span class="price-reg"><?php /*echo lang('product_price');*/?> <?php /*echo format_currency($relate->price); */?></span>
                                <?php /*endif; */?>
                            </div>
                            <?php /*if((bool)$relate->track_stock && $relate->quantity < 1 && config_item('inventory_enabled')) { */?>
                                <div class="stock_msg"><?php /*echo lang('out_of_stock');*/?></div>
                            <?php /*} */?>
                        </li>
                    <?php /*endforeach;*/?>
                </ul>
            </div>
        </div>
    </div>
--><?php /*endif;*/?>